/**
 * 
 */
package com.thor.palmmall.rest.chart.converter;

import org.springframework.core.convert.converter.Converter;

import com.thor.palmmall.rest.chart.AReceiptParam;
import com.thor.palmmall.spi.chart.SReceiptParam;

/**
 * @author NuoSa
 *
 * @since 1.0
 */
public class SReceiptReportConverter implements Converter<AReceiptParam, SReceiptParam> {

  public static SReceiptReportConverter getInstance() {
    if (instance == null)
      instance = new SReceiptReportConverter();
    return instance;
  }

  private static SReceiptReportConverter instance;

  private SReceiptReportConverter() {
  }

  @Override
  public SReceiptParam convert(AReceiptParam source) {
    if (source == null) {
      return null;
    }
    SReceiptParam target = new SReceiptParam();
    target.setSettle(source.getSettle());
    target.setStore(source.getStore());
    return target;
  }

}
